import request from '@/utils/request'

const api = {
    // 获取日程安排
    getInfo(id) {
        return request({
            url: `/api/BaseData/QmsBaseIpqccalendar/${id}`,
            method: 'get'
        });
    },
    // 获取日程安排列表
    getList(query) {
        return request({
            url: `/api/BaseData/QmsBaseIpqccalendar`,
            method: 'GET',
            data: query
        });
    },
    // 新建日程安排
    create(dataForm) {
        return request({
            url: `/api/BaseData/QmsBaseIpqccalendar`,
            method: 'post',
            data: dataForm,
        });
    },
    // 更新日程安排
    update(dataForm) {
        return request({
            url: `/api/BaseData/QmsBaseIpqccalendar/${dataForm.id}`,
            method: 'put',
            data: dataForm,
        });
    },
    // 删除日程安排
    delete(id) {
        return request({
            url: `/api/BaseData/QmsBaseIpqccalendar/${id}`,
            method: 'delete',
        });
    },
    // 初始化年度
    inityear(year) {
        return request({
            url: `/api/BaseData/QmsBaseIpqccalendar/${year}`,
            method: 'post',
        });
    },
    // 获取日程安排子表数据
    getScheduleList(query) {
        return request({
            url: `/api/BaseData/QmsBaseIpqccalendar/Schedule/getScheduleList`,
            method: 'GET',
            data: query
        });
    },

    // 获取日程安排子表信息
    ScheduleInfo(id) {
        return request({
            url: `api/BaseData/QmsBaseIpqccalendar/Schedule/ScheduleInfo/${id}`,
            method: 'get'
        })
    },
    // 新建日程子表安排
    ScheduleCreate(data) {
        return request({
            url: 'api/BaseData/QmsBaseIpqccalendar/Schedule/ScheduleCreate',
            method: 'post',
            data
        })
    },
    // 更新日程子表安排
    ScheduleUpdate(data) {
        return request({
            url: `/api/BaseData/QmsBaseIpqccalendar/Schedule/ScheduleUpdate/${data.id}`,
            method: 'PUT',
            data
        })
    },
    // 删除日程子表安排
    ScheduleDelete(id) {
        return request({
            url: `/api/BaseData/QmsBaseIpqccalendar/Schedule/ScheduleDelete/${id}`,
            method: 'DELETE',
        })
    }



};
export default api;
export const getScheduleAll = api.getAll;